using Unity.Entities;
using Unity.Mathematics;
using Unity.Physics;

namespace Gj
{
    public struct NextTranslation : IComponentData
    {
        public float3 Value;
    }

    public struct CastShootTrailData : IComponentData
    {
        public float time;
        public float3 origin;
        public float3 direction;
        public float speed;
        public float nextTime;
        public float totalTime;
    }

    public struct CastTargetTrailData : IComponentData
    {
        public float time;
        public float3 origin;
        public float3 target;
        public float nextTime;
        public float totalTime;
    }

    public struct CastThrowTrailData : IComponentData
    {
        public float time;
        public float3 origin;
        public float3 direction;
        public float speed;
        public float angle;
        public float gravity;
        public float nextTime;
    }

    public struct CastTrackTrailData : IComponentData
    {
        public float speed;
        public float rotateSpeed;
        public float3 targetPoint;
    }

    public struct CastAutoTrailData : IComponentData
    {
        public float time;
        public float3 origin;
        public float3 launch;
        public float3 target;
        public float totalTime;
        public float nextTime;
    }

    public struct CastRayData : IComponentData
    {
        public float3 Start;
        public float3 End;
        public bool multiple;
        public bool isScan;
    }

    public struct CastColliderData : IComponentData
    {
        public ColliderType type;
        public float3 Start;
        public float3 End;
        public float radius;
    }

    public struct CastViewData : IComponentData
    {
        public float angle;
        public float3 direction;
        public float radius;
        public float3 origin;
    }

    public struct SkillData : IComponentData
    {
        public int skillId;
        public float power;
        public int time;
        public Entity master;
        public TargetRelation targetRelation;
    }

    public struct CastTargetData : IComponentData
    {
        public Entity entity;
    }

    public struct CastTargetsData : IBufferElementData
    {
        public Entity entity;
    }

    public struct HitData : IComponentData
    {
        public int length;
        public double time;
    }

    public struct CastHitsData : IBufferElementData
    {
        public Entity entity;
    }

    public struct ViewHitsData : IBufferElementData
    {
        public Entity entity;
    }

    public struct RayHitData : IComponentData
    {
        public float3 point;
        public float3 normal;
        public Entity entity;
    }

    public struct RayHitsData : IBufferElementData
    {
        public Entity entity;
        public float3 point;
        public float3 normal;
    }

    public struct BeRayHitsData : IBufferElementData
    {
        public Entity entity;
        public float3 point;
        public float3 normal;
    }

    public struct OnSkillsData : IBufferElementData
    {
        public int skillId;
        public Entity entity;
        public float power;
        public int time;
    }
}